package com.test.springboot3.springboot3testdemo1.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2024/8/6-下午4:07
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@Configuration
public class KafkaConfig {
  public static final String SPRING_BOOT_TEST_TOPIC = "spring-boot-test-topic";

  @Bean
  public NewTopic topic() {
    return new NewTopic(SPRING_BOOT_TEST_TOPIC, 4, (short) 1);
  }
}
